<?php
class Admin extends CI_Controller {

		function index()
		{
	
			require_once('Zend/Acl.php');
			require_once('Zend/Acl/Role.php');
			require_once('Zend/Acl/Resource.php');
			$acl = new Zend_Acl();

			$acl->addRole(new Zend_Acl_Role('admin'));
			$acl->addRole(new Zend_Acl_Role('customer'));
			$acl->addRole(new Zend_Acl_Role('hotel'));

			$acl->add(new Zend_Acl_Resource('admin'));
			$acl->add(new Zend_Acl_Resource('admin/settings'), 'admin');
			$acl->add(new Zend_Acl_Resource('hotel'));
			$acl->add(new Zend_Acl_Resource('hotel/settings'), 'hotel');

			$acl->allow('admin');
			$acl->deny('hotel', 'hotel');

		   $permit = $acl->isAllowed('admin', 'hotel');

			echo $permit;
		}

}
?>